import { http } from './service.js'

export const getCoursePlanList = (classId, queryType) => {
	return http.request({
		url: '/pad/course/get_plan_list',
		method: 'POST',
		params: {
			'classId': classId,
			'queryType': queryType,
		}
	})
}

export const getNurserySchedule = (classId, queryType) => {
	return http.request({
		url: '/pad/course_nursery/today_plan_list',
		method: 'POST',
		params: {
			'classId': classId,
			'type': queryType,
			'pageSize': 99
		}
	})
}

export const getPlanDetail = (planId) => {
	return http.request({
		url: '/pad/course/plan_detail',
		method: 'POST',
		params: {
			'planId': planId,
		}
	})
}

export const getPlanEarlyByDate = (areaId, beginDate, endDate) => {
	return http.request({
		url: '/pad/course_early/plan_by_date',
		method: 'POST',
		params: {
			'areaId': areaId,
			'beginDate': beginDate,
			'endDate': endDate,
		}
	})
}

// 小象湾新课程
export const getPackageList = (params) => {
	return http.request({
		url: '/pad/vendor_courseV2/getPackageList',
		method: 'POST',
		params
	})
}

export const getWeekPackageList = (params) => {
	return http.request({
		url: '/pad/vendor_courseV2/weekPackageList',
		method: 'POST',
		params
	})
}

export const getWeekCourseList = (params) => {
	return http.request({
		url: '/pad/vendor_courseV2/weekCourseList',
		method: 'POST',
		params
	})
}

export const getWeekDetails = (params) => {
	return http.request({
		url: '/pad/vendor_courseV2/getWeekDetails',
		method: 'POST',
		params
	})
}

export const getCourseDetails = (params) => {
	return http.request({
		url: '/pad/vendor_courseV2/getCourseDetails',
		method: 'POST',
		params
	})
}

export const getAreaBulidCourseById = (params) => {
	return http.request({
		url: '/pad/course/get_area_bulid_course_ById',
		method: 'POST',
		params
	})
}

export const getCourseListV2 = (params) => {
	return http.request({
		url: '/pad/vendor_courseV2/courseListV2',
		method: 'POST',
		params
	})
}
// 
export const getCategoryTypeByGuide = (params) => {
	return http.request({
		url: '/pad/vendor_courseV2/categoryTypeByGuide',
		method: 'POST',
		params
	})
}

export const getCourseDict = (params) => {
	return http.request({
		url: '/pad/vendor_courseV2/getDatas',
		method: 'POST',
		params
	})
}



//家庭端
export const door2DoorChildren = (classId, queryType) => {
	return http.request({
		url: '/pad/nursery_schedule/door2DoorChildren',
		method: 'POST',
		params: {
			'classId': classId,
			'type': queryType,
			'pageSize': 99
		}
	})
}

export const getCoursePlanListByFamily = (childrenId, queryType) => {
	return http.request({
		url: '/pad/course/get_plan_family_list',
		method: 'POST',
		params: {
			'childrenId': childrenId,
			'type': queryType,
		}
	})
}

export const getNurseryScheduleByFamily = (childrenId, queryType) => {
	return http.request({
		url: '/pad/course_nursery/today_plan_family_list',
		method: 'POST',
		params: {
			'childrenId': childrenId,
			'type': queryType,
			'pageSize': 99
		}
	})
}



//家庭端
export const getCourseListV2ByFamily = (params) => {
	return http.request({
		url: '/wx/api/vendor_courseV2/courseListV2',
		method: 'POST',
		params
	})
}

export const getCourseDictByFamily = (params) => {
	return http.request({
		url: '/wx/api/vendor_courseV2/getDatas',
		method: 'POST',
		params
	})
}

export const getCourseDetailsByFamily = (params) => {
	return http.request({
		url: '/wx/api/vendor_courseV2/getCourseDetails',
		method: 'POST',
		params
	})
}

export const getCategoryTypeByGuideByFamily = (params) => {
	return http.request({
		url: '/wx/api/vendor_courseV2/categoryTypeByGuide',
		method: 'POST',
		params
	})
}

export const getChildrenSchedule = (params) => {
	return http.request({
		url: '/web/nursery_schedule/list',
		method: 'GET',
		params
	})
}

export const getChildrenVodList = (params) => {
	return http.request({
		url: '/v2/vod/item/list',
		method: 'GET',
		params
	})
}
